package net.lab1024.sa.admin.module.business.purchase.supplier.domain.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.lab1024.sa.admin.module.business.purchase.supplier.constant.SupplierCreditRatingEnum;
import net.lab1024.sa.admin.module.business.purchase.supplier.constant.SupplierStatusEnum;
import net.lab1024.sa.admin.module.business.purchase.supplier.constant.SupplierTypeEnum;
import net.lab1024.sa.base.common.domain.PageParam;
import net.lab1024.sa.base.common.swagger.SchemaEnum;
import net.lab1024.sa.base.common.validator.enumeration.CheckEnum;

/**
 * 供应商查询表单
 *
 * @Author 1024创新实验室
 * @Date 2024/07/19 20:30:00
 * @Wechat zhuoda1024
 * @Email lab1024@163.com
 * @Copyright <a href="https://1024lab.net">1024创新实验室</a>
 */
@Data
public class SupplierQueryForm extends PageParam {

    @Schema(description = "供应商编码")
    private String supplierCode;

    @Schema(description = "供应商名称")
    private String supplierName;

    @SchemaEnum(desc = "供应商类型", value = SupplierTypeEnum.class)
    @CheckEnum(value = SupplierTypeEnum.class, required = false, message = "供应商类型错误")
    private Integer supplierType;

    @Schema(description = "联系人")
    private String contactPerson;

    @Schema(description = "联系电话")
    private String contactPhone;

    @SchemaEnum(desc = "信用等级", value = SupplierCreditRatingEnum.class)
    @CheckEnum(value = SupplierCreditRatingEnum.class, required = false, message = "信用等级错误")
    private String creditRating;

    @SchemaEnum(desc = "状态", value = SupplierStatusEnum.class)
    @CheckEnum(value = SupplierStatusEnum.class, required = false, message = "状态错误")
    private Integer status;

    @Schema(description = "创建时间-开始时间")
    private String createTimeBegin;

    @Schema(description = "创建时间-结束时间")
    private String createTimeEnd;
}